package NewCoder;

public class BM97 {
    public int[] solve (int n, int m, int[] a) {
        // write code here
        int k=m%n;
        if(k==0) return a;
        int[] arr=new int[n];
        for(int i=n-k;i<n;i++){
            arr[i-n+k]=a[i];
        }
        for(int i=0;i<n-k;i++){
            arr[i+k]=a[i];
        }
        return arr;
    }
}
